import $service from '../../../../service.js';
var hospital_id = "1";
var that;
var this_;
var user_id;
let feeId
const app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    log_type:"",
    doctorInfo: {},
    doctorId: ''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (e) {
    console.log(e)
    feeId = e.feeId
    this.setData({
      log_type : e.log_type,      //问诊类型
      doctorId: e.doctorId
    })
  },
  onShow() {
    this.getDoctorDetail()
    that = this.data;
    this_ = this;
  },
  getDoctorDetail() {
    app.http.getDoctorDetail({id: this.data.doctorId}).then(res => {
        this.setData({
          doctorInfo: res.data
        })
    }).catch(err => {
        $service.showToast(err.msg);
    })
  },
  goLog:function(){
    //已支付，跳转到处方填写页
    $service.openPage('../inquiry_write/inquiry_write?doctorId=' +that.doctorId +'&log_type='+ this.data.log_type +'&feeId=' + feeId)
  }
})